﻿using PlaceOrder_Shared.Models.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PlaceOrder_Shared.Models.Trade
{
    public class TSInfoRow
    {
        public int id { get; set; }

        /// <summary>
        /// 债券编码
        /// </summary>
        public string? tsCode { get; set; }
        public string? BondKey { get; set; }
        public string? BondName { get; set; }

        /// <summary>
        /// 上市市场
        /// </summary>
        public string? ListedMarket { get; set; }

        /// <summary>
        /// 债券的信用评级
        /// </summary>
        public string? BondRating { get; set; }

        /// <summary>
        /// 上次爬取日期
        /// </summary>
        public DateOnly? LastDayCrawled { get; set; }

        /// <summary>
        /// 债券发行日期
        /// </summary>
        public DateOnly StartDate { get; set; }

        /// <summary>
        /// 债券信息状态
        /// </summary>
        public EnumTsInfoStatusCode StatusCode { get; set; }

        /// <summary>
        /// 债券发行利率
        /// </summary>
        public string IssueRate { get; set; } = "";

        /// <summary>
        /// 债券发行量
        /// </summary>
        public string IssueAmount { get; set; } = "";

        /// <summary>
        /// 债券发行价格
        /// </summary>
        public string IssuePrice { get; set; } = "";

        /// <summary>
        /// 到期情况
        /// </summary>
        public string Maturity { get; set; } = "";

        /// <summary>
        /// 到期日期
        /// </summary>
        public DateOnly? MaturityDate { get; set; }

        /// <summary>
        /// 债券完整名
        /// </summary>
        public string BondFullName { get; set; } = "";

        public bool RealTime { get; set; }

        /// <summary>
        /// 上次爬取时间
        /// </summary>
        public DateTime LastdayCrawledTime { get; set; }

        /// <summary>
        /// 每年利息支付次数
        /// </summary>
        public int InterestPerYear { get; set; }

        /// <summary>
        /// 首次交易日期
        /// </summary>
        public DateOnly FirstTradeDate { get; set; }

        /// <summary>
        /// 利息支付日期
        /// </summary>
        public DateOnly InterestDate { get; set; }


        public DateOnly? QBDate { get; set; }

        /// <summary>
        /// 是否正在运行
        /// </summary>
        public bool isRunning { get; set; }

        /// <summary>
        /// 债券所属池标识符
        /// </summary>
        public int PoolId { get; set; }

        /// <summary>
        /// 恒生市场标识符
        /// </summary>
        public string HengShengMarketID { get; set; }

        /// <summary>
        /// 恒生市场名
        /// </summary>
        public string HengShengMarketName { get; set; }

        /// <summary>
        /// 债券价格的基点价值
        /// </summary>
        public decimal PVBP { get; set; }
    }
}
